Online-Academy
Look, Read, Understand, Apply

Data Mining And Data Warehousing

Bayesian Classifier

What Is a Bayesian Classifier?

A Bayesian classifier is a probabilistic model based on Bayes' Theorem, used for classification tasks in machine learning. It predicts the probability that a given instance belongs to a particular class, based on prior knowledge and observed data.
where:
  • P(C/X) = Probability of class C given data X (Posterior)
  • P(X/C) = Probability of class X given class C
  • P(C) = Probability of class C
  • P(X) = Probability of data X (evidence that is seen)
P(Ci/X) is calculated for all the classes, Probability of class whose value maximizes, X belongs to that class.
For example, let's suppose X is a person with (age <30, and income=medium), and classes (C1 = watch movies and C2 does not watch movie).
We have to calculate, P(X/C1), P(X/C1), P(C1), P(C2).
    here, P(X/C1) = P(age < 30/C1) * P(income=medium/C1)
     P(X/C2) = P(age < 30/C2) * P(income=medium/C2)
    then
    P(C1/X) = P(X/C1) * P(C1)---- i
    P(C2/X) = P(X/C2) * P(C2)---- ii
    Among i, and ii which get maximum value, X belongs to that class.